A database is a collection of information related to a subject, organized in a manner to facilitate storing and retrieving information in a scalable and robust fashion. Computerized databases are employed for storing information in many formats and providing that information to users and applications. For example, a database could contain information regarding clients and their recent purchases. The information regarding a particular client may be retrieved from database.
Computerized databases are implemented in processing systems which typically include a processor, a memory and input/output devices. The processor executes programs stored in memory, and the programs communicate with the environment using the input/output devices. The computerized databases include tools for data insertion, deletion, modification and retrieval. Programs stored in the memory can employ these tools to perform tasks on the databases, with individual tasks referred to as database events. As an example, a program in C or Java could retrieve data from a database, perform some calculations, and store the result back into the database.
Numerous users or applications may be simultaneously performing operations on a particular database. Some of the users or applications may need information about database events as they occur. For example, an application may include a facility for sending a message about packaging and shipping a product. Before sending that message, the application needs to know when payment has been received, which is an item of information stored by the database. Database triggers may be used to write the payment information to history tables, and then these tables may be polled to obtain a list of changes in the database. A database trigger is code that is automatically executed in response to certain events on a particular table in a database.
In certain situations, users and applications located remotely from the database require information regarding events in critical tables in the database. Triggers may be used to send messages using platform-specific messaging systems, like Java Messaging System (JMS), to queues which are subscribed by consuming systems, but only those systems capable of employing such messaging systems can send and receive information regarding database events. In this example, only Java programs can send or receive JMS messages.